package club.kingyin.kyblogprocore.service;

import club.kingyin.commons.entity.core.Document;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * (Document)表服务接口
 *
 * @author makejava
 * @since 2022-02-16 18:22:14
 */
public interface DocumentService extends IService<Document> {


    List<Integer> getIds();

    int getViewsById(int id);

    Document getDocumentByUserIdAndId(int userid, int id);

    int containsIdByTitleAndUserId(String title, int userid);

    List<Document> searchIdByTitleAndUserId(String title, int userid);

    Page<Document> selectDocumentPage(Page<Document> page, Document document);

    Page<Document> selectDocuments(Page<Document> page, Document document);

    Page<Document> selectHome(int current);

    Page<Document> selectBottom(int current);

    void updateView(Document doc);


}

